{% extends 'base.html'%}
{% block title %}

{% endblock %}
{% block content %}
<div class="recommend-index">
                <div class="recommend-top">

                    <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
                        <ol class="carousel-indicators">
                            <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
                            <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
                            <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
                        </ol>
                        <div class="carousel-inner">
                            <div class="carousel-item active">
                                <img class="d-block w-100" src="../static/temporary-img/recommended.jpg" alt="First slide">
                            </div>
                            <div class="carousel-item">
                                <img class="d-block w-100" src="../static/temporary-img/recommended.jpg" alt="Second slide">
                            </div>
                            <div class="carousel-item">
                                <img class="d-block w-100" src="../static/temporary-img/recommended.jpg" alt="Third slide">
                            </div>
                        </div>
                        <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
                            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                            <span class="sr-only">Previous</span>
                        </a>
                        <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
                            <span class="carousel-control-next-icon" aria-hidden="true"></span>
                            <span class="sr-only">Next</span>
                        </a>
                    </div>
                </div>
                <div class="recommend-bottom">
                    <div class="recommend-item">
                        <a href="details.html"><img src="../static/temporary-img/recommended-left.jpg" class="img-fluid" alt=""></a>
                    </div>
                    <div class="recommend-item">
                        <a href="details.html"><img src="../static/temporary-img/recommended-right.jpg" class="img-fluid" alt=""></a>
                    </div>
                </div>

            </div>
            {% for article in articles %}
                <div class="cl-card">
                    <div class="row">
                        <div class="col-lg-3 col-md-4 col-sm-12 cl-card-image"><a href="{% url 'home:details' %}?artid={{article.id}}"><img src="{{ article.avatar.url }}" class="img-fluid" alt=""></a></div>
                        <div class="col-lg-9 col-md-8 col-sm-12 cl-card-main">
                            <h3 class="cl-card-main-title"><a href="{% url 'home:details' %}?artid={{article.id}}">{{article.title}}</a></h3>
                            <p class="cl-card-main-info">{{ article.sumary }}</p>
                            <p class="cl-card-more"><a href="{% url 'home:details' %}?artid={{article.id}}">阅读更多...</a></p>
                        </div>
                    </div>
                </div>

            {% endfor %}
            <nav aria-label="Page navigation example">
                <ul class="pagination justify-content-center">
                    <li class="page-item disabled">
                        <a class="page-link" href="#" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                            <span class="sr-only">Previous</span>
                        </a>
                    </li>
                    <li class="page-item active"><a class="page-link" href="#">1</a></li>
                    <li class="page-item"><a class="page-link" href="#">2</a></li>
                    <li class="page-item"><a class="page-link" href="#">3</a></li>
                    <li class="page-item">
                        <a class="page-link" href="#" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                            <span class="sr-only">Next</span>
                        </a>
                    </li>
                </ul>
            </nav>

{% endblock %}

